import request from '@/router/axios'

export function fetchList(query) {
  return request({
    url: '/stm/swstinvoicexaztcheck/page',
    method: 'get',
    params: query
  })
}

export function getObj(id) {
  return request({
    url: '/stm/swstinvoicexaztcheck/' + id,
    method: 'get'
  })
}

// 车间票务专业审核
export function workshopApprovalObj(obj) {
  return request({
    url: '/stm/swstinvoicexaztcheck/modify/workshopApproval/status',
    method: 'put',
    params: obj
  })
}

//删除
export function removeById(id) {
  return request({
    url: '/stm/swstinvoicexaztcheck/' + id,
    method: 'delete'
  })
}

// 车间票务专业驳回
export function workshopRejectObj(obj) {
  return request({
    url: '/stm/swstinvoicexaztcheck/modify/workshopReject/status',
    method: 'put',
    params: obj
  })
}

// 部门票务专业审核
export function departmentApprovalObj(obj) {
  return request({
    url: '/stm/swstinvoicexaztcheck/modify/departmentApproval/status',
    method: 'put',
    params: obj
  })
}

// 部门票务专业驳回
export function departmentRejectObj(obj) {
  return request({
    url: '/stm/swstinvoicexaztcheck/modify/departmentReject/status',
    method: 'put',
    params: obj
  })
}

// 导出
export function exportExcel(query) {
  return request({
    url: "/stm/swstinvoicecatcheck/exportInvoiceCheckForApproval",
    method: "post",
    data: query,
    responseType: "blob",
    headers: {
      "Content-Type": "application/json;charset=UTF-8"
    }
  });
}

export function exportStation(query) {
  return request({
    url: "/stm/swstinvoicexaztcheck/exportInvoiceXaztCheckForStation",
    method: "post",
    data: query,
    responseType: "blob",
    headers: {
      "Content-Type": "application/json;charset=UTF-8"
    }
  });
}

// 导出--全部车站多个sheet
export function exportExcelStationAll(query) {
  return request({
    url: "/stm/swstinvoicexaztcheck/exportInvoiceXaztCheckForStationAll",
    method: "post",
    data: query,
    responseType: "blob",
    headers: {
      "Content-Type": "application/json;charset=UTF-8"
    }
  });
}
